<?PHP
	ini_set('magic_quotes_gpc', 'off');
	
	$templatePath= get_absolute_template_path(); 
	
	$settings=array();
	
	if( isset($_POST['quote']))
	{
		$settings=	 json_decode(file_get_contents($templatePath."/settings.txt"));
		$settings->quote= convertNewlineToBRcode($_POST['quote']);
		
		file_put_contents($templatePath."/settings.txt", json_encode($settings));
	}
	else
		$settings= json_decode(file_get_contents($templatePath."/settings.txt"));
	
?>
<h1>Set quote text</h1>
<form action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
	<label for="quote">Quote text:</label><br />
	<textarea cols="50" rows="5" onclick="select();"  name="quote" style="display:inline"></textarea><br />
	<input class="button button-primary" type="submit" name="upload_title_image" value="Save" style="display:inline" />
	
	<br />
	<br />
	
	<div><u><strong>Current quote:</strong></u><br/> <?PHP echo convertNewlineToBRcode($settings->quote); ?></div>
</form>